<!doctype html>
<html lang="en">
<!-- head 区域 - 开始 -->
<?php
$title='系统设置';
require_once('head.php');
if($userrow['uid']!=1){
  alert("你来错地方了","index.php");
}
?>
<!-- head 区域 - 结束 -->

<body data-topbar="dark" data-layout="horizontal">

  <!-- 页面 - 开始 -->
  <div id="layout-wrapper">

    <!-- 头部区域 - 开始 -->
    <?php include('header.php'); ?>
    <!-- 头部区域 - 结束 -->

    <!-- 顶部导航栏 - 开始 -->
    <?php include('topnav.php'); ?>
    <!-- 顶部导航栏 - 结束 -->

    <!-- 主内容区域 - 开始 -->
    <div class="main-content" id="add">

      <div class="page-content">
        <div class="container-fluid">

          <div class="row mt-4">
            <div class="col-lg-12">
              <div class="card">
                <div class="card-body">

                  <form class="form-horizontal devform" id="form-web">

                    <!-- Nav tabs -->
                    <ul class="nav nav-pills nav-justified" role="tablist">
                      <li class="nav-item waves-effect waves-light">
                        <a class="nav-link active" data-toggle="tab" href="#wzpz-1" role="tab">
                          <span class="d-block d-sm-none"><i class="fas fa-home"></i></span>
                          <span class="d-none d-sm-block">网站配置</span>
                        </a>
                      </li>
                      <li class="nav-item waves-effect waves-light">
                        <a class="nav-link" data-toggle="tab" href="#dlpz-1" role="tab">
                          <span class="d-block d-sm-none"><i class="far fa-user"></i></span>
                          <span class="d-none d-sm-block">代理配置</span>
                        </a>
                      </li>
                      <li class="nav-item waves-effect waves-light">
                        <a class="nav-link" data-toggle="tab" href="#zfpz-1" role="tab">
                          <span class="d-block d-sm-none"><i class="far fa-envelope"></i></span>
                          <span class="d-none d-sm-block">支付配置</span>
                        </a>
                      </li>
                      <li class="nav-item waves-effect waves-light">
                        <a class="nav-link" data-toggle="tab" href="#jhdl-1" role="tab">
                          <span class="d-block d-sm-none"><i class="fas fa-cog"></i></span>
                          <span class="d-none d-sm-block">聚合登录</span>
                        </a>
                      </li>
                      <li class="nav-item waves-effect waves-light">
                        <a class="nav-link" data-toggle="tab" href="#flpz-1" role="tab">
                          <span class="d-block d-sm-none"><i class="fas fa-cog"></i></span>
                          <span class="d-none d-sm-block">分类配置</span>
                        </a>
                      </li>
                    </ul>

                    <!-- Tab panes -->
                    <div class="tab-content">
                      <div class="tab-pane active p-3" id="wzpz-1" role="tabpanel">
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>站点名称</label>
                              <div>
                                <input name="sitename" value="<?=$conf['sitename']?>" placeholder="请输入站点名称" type="text"
                                  class="form-control">
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>LOGO地址</label>
                              <div>
                                <input name="logo" value="<?=$conf['logo']?>" placeholder="请输入logo地址" type="text"
                                  class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>SEO关键词</label>
                              <div>
                                <input name="keywords" value="<?=$conf['keywords']?>" placeholder="请输入SEO关键词"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>SEO介绍</label>
                              <div>
                                <input name="description" value="<?=$conf['description']?>" placeholder="请输入SEO介绍"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>SEO关键词</label>
                              <div>
                                <input name="keywords" value="<?=$conf['keywords']?>" placeholder="请输入SEO关键词"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>SEO介绍</label>
                              <div>
                                <input name="description" value="<?=$conf['description']?>" placeholder="请输入SEO介绍"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-12">
                            <div class="form-group">
                              <label>是否开启水印</label>
                              <div>
                                <select name="sykg" class="form-control">
                                  <option value="1" <?php if($conf['sykg']==1){ echo 'selected' ;}?>>1_允许</option>
                                  <option value="0" <?php if($conf['sykg']==0){ echo 'selected' ;}?>>0_拒绝</option>
                                </select>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>网站公告</label>
                              <div>
                                <textarea type="text" name="notice" class="form-control" rows="5"
                                  placeholder="请输入网站公告"><?=$conf['notice']?></textarea>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>弹窗公告</label>
                              <div>
                                <textarea type="text" name="tcgonggao" class="form-control" rows="5"
                                  placeholder="请输入弹窗公告"><?=$conf['tcgonggao']?></textarea>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="tab-pane p-3" id="dlpz-1" role="tabpanel">
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>是否开启上级迁移功能</label>
                              <div>
                                <select name="sjqykg" class="form-control">
                                  <option value="1" <?php if($conf['sjqykg']==1){ echo 'selected' ;}?>>1_开启</option>
                                  <option value="0" <?php if($conf['sjqykg']==0){ echo 'selected' ;}?>>0_关闭</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>是否允许邀请码注册</label>
                              <div>
                                <select name="user_yqzc" class="form-control">
                                  <option value="1" <?php if($conf['user_yqzc']==1){ echo 'selected' ;}?>>1_允许</option>
                                  <option value="0" <?php if($conf['user_yqzc']==0){ echo 'selected' ;}?>>0_拒绝</option>
                                </select>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>是否允许后台开户</label>
                              <div>
                                <select name="user_htkh" class="form-control">
                                  <option value="1" <?php if($conf['user_htkh']==1){ echo 'selected' ;}?>>1_允许</option>
                                  <option value="0" <?php if($conf['user_htkh']==0){ echo 'selected' ;}?>>0_拒绝</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>代理开通价格</label>
                              <div>
                                <input name="user_ktmoney" value="<?=$conf['user_ktmoney']?>" placeholder="请输入代理开通价格"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="tab-pane p-3" id="zfpz-1" role="tabpanel">
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>最低充值</label>
                              <div>
                                <input type="text" class="form-control" name="zdpay" value="<?=$conf['zdpay']?>"
                                  placeholder="请输入最低充值金额" required>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>是否开启QQ支付</label>
                              <div>
                                <select name="is_qqpay" class="form-control">
                                  <option value="1" <?php if($conf['is_qqpay']==1){ echo 'selected' ;}?>>1_开启</option>
                                  <option value="0" <?php if($conf['is_qqpay']==0){ echo 'selected' ;}?>>0_关闭</option>
                                </select>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>是否开启微信支付</label>
                              <div>
                                <select name="is_wxpay" class="form-control">
                                  <option value="1" <?php if($conf['is_wxpay']==1){ echo 'selected' ;}?>>1_开启</option>
                                  <option value="0" <?php if($conf['is_wxpay']==0){ echo 'selected' ;}?>>0_关闭</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>是否开启支付宝支付</label>
                              <div>
                                <select name="is_alipay" class="form-control">
                                  <option value="1" <?php if($conf['is_alipay']==1){ echo 'selected' ;}?>>1_开启</option>
                                  <option value="0" <?php if($conf['is_alipay']==0){ echo 'selected' ;}?>>0_关闭</option>
                                </select>
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-12">
                            <div class="form-group">
                              <label>易支付API</label>
                              <div>
                                <input name="epay_api" value="<?=$conf['epay_api']?>"
                                  placeholder="格式：http://www.baidu.com/" type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>商户ID</label>
                              <div>
                                <input name="epay_pid" value="<?=$conf['epay_pid']?>" placeholder="请输入商户ID" type="text"
                                  class="form-control">
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>商户KEY</label>
                              <div>
                                <input name="epay_key" value="<?=$conf['epay_key']?>" placeholder="请输入商户KEY" type="text"
                                  class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="tab-pane p-3" id="jhdl-1" role="tabpanel">
                        <div class="row">
                          <div class="col-md-12">
                            <div class="form-group">
                              <label>彩虹API聚合登录</label>
                              <div>
                                <input name="login_apiurl" value="<?=$conf['login_apiurl']?>" placeholder="请输入聚合登录地址"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>应用ID</label>
                              <div>
                                <input name="login_appid" value="<?=$conf['login_appid']?>" placeholder="请输入聚合登录应用ID"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>应用KEY</label>
                              <div>
                                <input name="login_appkey" value="<?=$conf['login_appkey']?>" placeholder="请输入聚合登录应用KEY"
                                  type="text" class="form-control">
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="tab-pane p-3" id="flpz-1" role="tabpanel">
                        <div class="row">
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>分类开关</label>
                              <div>
                                <select name="flkg" class="form-control">
                                  <option value="1" <?php if($conf['flkg']==1){ echo 'selected' ;}?>>开启</option>
                                  <option value="0" <?php if($conf['flkg']==0){ echo 'selected' ;}?>>关闭</option>
                                </select>
                              </div>
                            </div>
                          </div>
                          <div class="col-md-6">
                            <div class="form-group">
                              <label>分类类型</label>
                              <div>
                                <select name="fllx" class="form-control">
                                  <option value="0" <?php if($conf['fllx']==0){ echo 'selected' ;}?>>侧边栏分类</option>
                                  <option value="1" <?php if($conf['fllx']==1){ echo 'selected' ;}?>>下单页面选择框分类</option>
                                  <option value="2" <?php if($conf['fllx']==2){ echo 'selected' ;}?>>下单页面单选框分类</option>
                                </select>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>

                    <!-- 保存按钮 -->
                    <button type="button" @click="add"
                      class="btn btn-primary btn-lg btn-block waves-effect waves-light mt-2">保存设置</button>

                  </form>

                </div>
              </div>
            </div>
          </div>
          <!-- end row -->

        </div> <!-- container-fluid -->
      </div>
      <!-- End Page-content -->

      <!-- 底部版权区域 - 开始 -->
      <?php include('copyright.php'); ?>
      <!-- 底部版权区域 - 结束 -->

    </div>
    <!-- 主内容区域 - 结束 -->
  </div>
  <!-- 页面 - 结束 -->

  <!-- 底部文件 - 开始 -->
  <?php include('footer.php'); ?>
  <!-- 底部文件 - 结束 -->

  <script type="text/javascript">
    new Vue({
      el: "#add",
      data: {

      },
      methods: {
        add: function () {
          // var loading=layer.load(2);
          SlickLoader.setText('加载中...')
          SlickLoader.enable();
          this.$http.post("/apisub.php?act=webset", { data: $("#form-web").serialize() }, { emulateJSON: true }).then(function (data) {
            // layer.close(loading);
            SlickLoader.disable();
            if (data.data.code == 1) {
              layer.alert(data.data.msg, { icon: 1, title: "温馨提示" }, function () { setTimeout(function () { window.location.href = "" }); });
            } else {
              layer.alert(data.data.msg, { icon: 2, title: "温馨提示" });
            }
          });
        }
      },
      mounted() {
        //this.getclass();		
      }
    });
  </script>

</body>

</html>